<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../scripts/jquery.js" type="text/javascript"></script>
<style>

#XY1{
	width:560px;
	height:300px;
	background:#aaa;
}
#XY2{
	width:360px;
	height:300px;
	background:#aaa;
}
</style>
</head>
<body>
<div id="XY1" class="box"></div>
<div id="XY2" class="box"></div>

<script>
$(document).ready(function() {  
   $.extend($.expr[':'], {  
       moreThen500px: function(a) {  
           return $(a).width() > 500;  
      }  
   });  
  $('.box:moreThen500px').click(function() {  
      alert();  
  });  
});

</script>
</body>
</html>